{template 'common/header'}
<link rel="stylesheet" type="text/css" href="{MODULE_URL}template/style/main.css">






<div class="page-title">分类管理页面</div>


<div class="btn btn-success add-article">

	<a href="{php echo url('site/entry/CategoryEdit', array('m' => 'yts_qiye'));}">新增分类</a>
</div>

<ul class="nav nav-tabs">
		<li{if $_GPC['type'] == 1 OR $_GPC['type'] == 0 } class="active"{/if}><a href="{php echo $this->createWeburl('Category', array('type' => 1));}">文章分类</a></li>
		<li{if $_GPC['type'] == 2} class="active"{/if}><a href="{php echo $this->createWeburl('Category', array('type' => 2));}">产品分类</a></li>
	</ul>

<table class="table table-striped table-bordered table-hover">
    <thead>
    <tr>
        <th>ID</th>
        <th>分类名称</th>
		<th>排序</th>

        <th>提交时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>

    {loop $formresult $index $item}
	<tr>
	    <td>{$item['id']}</td>
		<td>{$item['title']}</td>
		<td>{$item['sort']}</td>
	  
	    <td>{php echo date('Y-m-d H:i:s', $item['add_time'])}</td>
	    <td>

				<a href="{php echo $this->createWebUrl('CategoryDel',array('id' => $item['id']))}" onclick="return confirm('你确定要删除吗？请确认分类下是否有内容！！')" 
						class="btn btn-danger">删除</a>

			<a class="btn btn-success" href="{php echo url('site/entry/CategoryEdit', array('m' => 'yts_qiye','id'=>$item['id'],'op'=>'edit'));}">编辑</a>
		</td>
	</tr>
	{/loop}
    </tbody>
</table>
<div class="showPage">{$_pagination_var}</div>


{template 'common/footer'}